<?xml version='1.0' encoding='UTF-8' ?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml"
      xmlns:h="http://java.sun.com/jsf/html"
      xmlns:f="http://java.sun.com/jsf/core"
      xmlns:ui="http://java.sun.com/jsf/facelets"
      xmlns:a4j="http://richfaces.org/a4j"
      xmlns:rich="http://richfaces.org/rich">
    <h:head>
        <f:verbatim>
            <link href="./resources/css/layout.css" rel="stylesheet" type="text/css" />
            <link href="./resources/css/default.css" rel="stylesheet" type="text/css" />
        </f:verbatim>
        <title>Дисциплины</title>
    </h:head>
    <h:body>
        <div id="wrapper">
            <div id="top">
                <img src="./resources/logo.png" align="middle" id="logoImg" class="logo"/>
                <h:outputFormat styleClass="header" value="Электронный учебно-методический комплекс"/>
            </div>
            <div id="navigation">
                <h:form id="navigationForm">
                    <ul>
                        <li> <h:commandLink id="clHome" value="Факультеты" action="index.xhtml" styleClass="navLink"/> </li>
                        <li> <h:commandLink id="clDepartments" value="Кафедры" action="departments.xhtml" styleClass="navLink"/> </li>
                        <li> <h:commandLink id="clSpecialities" value="Специальности" action="specialities.xhtml" styleClass="navLink"/> </li>
                        <li> <h:commandLink id="clDisciplines" value="Дисциплины" action="disciplines.xhtml" styleClass="navLink"/> </li>
                    </ul>
                </h:form>
            </div>
            <div id="article">
                <h:form id="disciplineForm">
                    <h:panelGrid id="discipSummary" columns="3">
                        <h:outputLabel id ="disciplineLabel" value="#{disciplineBean.disciplineName}" styleClass="disciplineName"/>
                        <h:outputLabel id ="face1Label" />
                        <h:outputLabel id ="face2Label" />
                        <h:outputLabel id ="codeLabel" value="Код Дисциплины:"/>
                        <h:inputText id="codeNumber" value="#{disciplineBean.code}" disabled="true"/>
                        <br/>
                    </h:panelGrid>
                    <h:panelGrid id="discipOptions" columns="8">
                        <h:outputLabel id ="lecturesLabel" value="Лекции:"/>
                        <h:selectBooleanCheckbox id="lectures" value="#{disciplineBean.lectures}" disabled="true"/>

                        <h:outputLabel id ="practiceLabel" value="Практика:"/>
                        <h:selectBooleanCheckbox id="practice" value="#{disciplineBean.practice}" disabled="true"/>

                        <h:outputLabel id ="labsLabel" value="Лабораторные:"/>
                        <h:selectBooleanCheckbox id="labs" value="#{disciplineBean.labs}" disabled="true"/>

                        <h:outputLabel id ="quizLabel" value="Зачет:"/>
                        <h:selectBooleanCheckbox id="quiz" value="#{disciplineBean.quiz}" disabled="true"/>

                        <h:outputLabel id ="examLabel" value="Экзамен:"/>
                        <h:selectBooleanCheckbox id="exam" value="#{disciplineBean.exam}" disabled="true"/>

                        <h:outputLabel id ="courseProjectLabel" value="Курсовой:"/>
                        <h:selectBooleanCheckbox id="courseProject" value="#{disciplineBean.courseProject}" disabled="true"/>

                        <h:outputLabel id ="testLabel" value="Тестирование:"/>
                        <h:selectBooleanCheckbox id="test" value="#{disciplineBean.test}" disabled="true"/>
                    </h:panelGrid>
                    <rich:panel>
                        <rich:tabPanel switchType="ajax" activeItem="#{disciplineBean.activeTab}">
                            <rich:tab id="ExcerptGosTab" name="ExcerptGos" header="Выписка из ГОС">
                                <h:panelGroup id="info">
                                    <rich:panel bodyClass="info">
                                        <f:facet name="header">
                                            <h:outputText value="Досупные документы" />
                                        </f:facet>
                                        <h:outputText value="Нет загруженных файлов"
                                                      rendered="true" />
                                        <!--rich:dataGrid columns="1" value="#{fileUploadBean.files}"
                                            var="file" rowKeyVar="row">
                                            <rich:panel bodyClass="rich-laguna-panel-no-header">
                                                <h:panelGrid columns="2">
                                                    <a4j:mediaOutput element="img" mimeType="#{file.mime}"
                                                        createContent="#{fileUploadBean.paint}" value="#{row}"
                                                        style="width:100px; height:100px;" cacheable="false">
                                                        <f:param value="#{fileUploadBean.timeStamp}" name="time"/>
                                                    </a4j:mediaOutput>
                                                    <h:panelGrid columns="2">
                                                        <h:outputText value="File Name:" />
                                                        <h:outputText value="#{file.name}" />
                                                        <h:outputText value="File Length(bytes):" />
                                                        <h:outputText value="#{file.length}" />
                                                    </h:panelGrid>
                                                </h:panelGrid>
                                            </rich:panel>
                                        </rich:dataGrid-->
                                    </rich:panel>
                                </h:panelGroup>
                                <rich:fileUpload fileUploadListener="#{disciplineBean.uploadListener}" uploadLabel="Добавить">
                                    <a4j:ajax event="uploadcomplete" render="info" />
                                </rich:fileUpload>
                            </rich:tab>
                            <rich:tab id="WorkProgramTab" name="WorkProgram" header="Рабочая программа">
                                Here is tab #2
                            </rich:tab>
                            <rich:tab id="LectureSynopsisTab" name="LectureSynopsis" header="Конспект лекций">
                                Here is tab #3
                            </rich:tab>
                            <rich:tab id="GuidelinesCpTab" name="GuidelinesCp" header="Курсовое проектирование">
                                Here is tab #4
                            </rich:tab>
                            <rich:tab id="GuidelinesLabTab" name="GuidelinesLab" header="Лабораторные работы">
                                Here is tab #5
                            </rich:tab>
                            <rich:tab id="DocSamplesTab" name="#{disciplineBean.docSamples}" header="Образцы">
                                Here is tab #6
                            </rich:tab>
                        </rich:tabPanel>
                    </rich:panel>
                </h:form>
            </div>
        </div>
    </h:body>
</html>

